set(g3dlite_STAT_SRCS
  AABox.cpp
  Any.cpp
  BinaryFormat.cpp
  BinaryInput.cpp
  BinaryOutput.cpp
  Box.cpp
  Capsule.cpp
  CollisionDetection.cpp
  CoordinateFrame.cpp
  Crypto.cpp
  Cylinder.cpp
  debugAssert.cpp
  FileSystem.cpp
  fileutils.cpp
  format.cpp
  g3dfnmatch.cpp
  g3dmath.cpp
  Line.cpp
  LineSegment.cpp
  Log.cpp
  Matrix3.cpp
  Matrix4.cpp
  MemoryManager.cpp
  PhysicsFrame.cpp
  Plane.cpp
  prompt.cpp
  Quat.cpp
  Random.cpp
  Ray.cpp
  ReferenceCount.cpp
  RegistryUtil.cpp
  Sphere.cpp
  stringutils.cpp
  System.cpp
  TextInput.cpp
  TextOutput.cpp
  Triangle.cpp
  uint128.cpp
  UprightFrame.cpp
  Vector2.cpp
  Vector3.cpp
  Vector4.cpp
)

if(WIN32)
  include_directories(
    ${CMAKE_SOURCE_DIR}/dep/include/g3dlite
    ${CMAKE_SOURCE_DIR}/dep/include/zlib
  )
else()
  include_directories(
    ${CMAKE_SOURCE_DIR}/dep/include/g3dlite
  )
endif()

add_library(g3dlite STATIC ${g3dlite_STAT_SRCS})

if(WIN32)
  target_link_libraries(g3dlite
    zlib
  )
else()
  target_link_libraries(g3dlite
    ${ZLIB_LIBRARIES}
  )
endif()
